package huaabdelmartin_stage2;

public class Worker implements Runnable{
		//instance variables
		private TheBrain brain;
		private Car currentTaxi;
		private PassengerGroup currentPG;
		//constructor
		public Worker(TheBrain brain) {
		this.brain = brain;
		}

		public TheBrain getBrain() {
		return brain;
		}

		public void setBrain(TheBrain brain) {
		this.brain = brain;
		}
		
		public boolean hasData(){
			if(currentTaxi != null && currentPG != null){
				return true;
			}
			return false;
		}

		public void getNextTaxi(){
			this.currentTaxi = brain.getNextTaxi();
		}
		
		public void getNextPassengerGroup(){
			this.currentPG = brain.getNextPG();	
		}
		
		public Car getCurrentTaxi() {
			return currentTaxi;
		}

		public void setCurrentTaxi(Car currentTaxi) {
			this.currentTaxi = currentTaxi;
		}

		public PassengerGroup getCurrentPG() {
			return currentPG;
		}

		public void setCurrentPG(PassengerGroup currentPG) {
			this.currentPG = currentPG;
		}

		@Override
		public void run() {
		// TODO Auto-generated method stub
		return ;
		}

}



